package com.itheima.controller;

import com.itheima.domain.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

	@Value("${personName}")
	private String personName;

	@Autowired
	private Person person;

	@GetMapping("person")
	public Person person(){


		return person;
	}


	@GetMapping("personName")
	public String personName(){


		return personName;
	}


	@GetMapping("hello")
	public String hello(){
		return "springboot02";
	}
}
